package com.cluster.gulimall.member.controller;

import com.cluster.gulimall.common.utils.R;
import com.cluster.gulimall.member.entity.UmsMember;
import com.cluster.gulimall.member.feign.CouponFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member")
public class MemberController {


    @Autowired
    private CouponFeignService couponFeign;

    @RequestMapping("/getMemberCoupons")
    public R getMemberCoupons(){
        UmsMember member = new UmsMember();
        member.setNickname("张三");
        R memberCoupons = couponFeign.memberCoupons();

        return R.ok().put("member",member).put("coupons",memberCoupons.get("coupons"));
    }
}
